﻿using System.IO.Compression;

namespace U8DllPack.Controller
{
    internal class ZipHelper
    {
        /// <summary>
        /// 创建ZIP压缩文件
        /// </summary>
        /// <param name="ZipFilename">压缩文件全路径</param>
        /// <param name="ZipTempPath">文件临时存放目录</param>
        public static void CreateZip(string ZipFilename, string ZipTempPath)
        {
            try
            {
                ZipFile.CreateFromDirectory(ZipTempPath, ZipFilename, CompressionLevel.SmallestSize, false);
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
